package com.dk.config;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {
//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000118651880";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCCHPRtz/Nb9DP2Q/S+xXesbGUpKB6ofsR5pEZYGC0JEh5jg+NEm7FgB37VHHA4v19KDJmxKyfjzpmCShIaKOxuiOoVpx85oFbuJwU1mPMYD7OW+zcP3uaN50KniV1+pyDRwE3JbqjZ+zJDIpGB9JsGu1IocW4bTGhR1owWxVEvDfgtvOJhKpw45rHb1TPBuvDprXqDpQ63GjpyxZ/hw5WR9utjb737yAu9N0SEtZe39vU3di+bbQobxK9KUC2F3+BiVHzKE8GCA4LEutz+jLNMhKIbvQq7D6/mnHmjwPY5FP5imRih2J4lsk5db1UYOY8gqnka6SttnjHJIodCL1HDAgMBAAECggEABaV0Bf/sM6VZS+qPCGhRVS4vBaY0DmPR6uVyGAiUi7w5jV//0M5g2CX7Hwxo4k2LuQ7q7IFO7dfdWYYVWwVDnVhbsCzccge/Pf57f2PvyK+Fv5uPPCUUJDxQ7CxN3l0qU2/g8EjZEvyPpdIuNlGDGLuwSQkDGjQqosKIucQ+Tahg7r0H0P1Mbz+YtUAeLRhUjhT1894bra+aucHEI3T1ZQkEab9N4fu63PGcTQedOcaVQb3K8uOLBi7rEfbshZ16ZKqVZxrEHYl19Kvhy79mf9b6sbrCkKUmtn7MZZK4UU+IOQe6Njs3LRMb+zWlbDfifDcVyFVcn4pZi6m69OcW4QKBgQD4iphc0TikOIxiQvYps//x34XJUNfT0xRF3pw4Nt59KbAirvxiHl4zkCVG5h6Q44ueCW44MliO3iN0cmolDwdGa2hiAOQmhDdffDtavcQFsC0C8mU9T97y2Pij0N/XMQNd+CNQ61Dsu8pPGWM2s+Hl1kXoj3NPfPkEMyGs57xofwKBgQCGBIqMOLYSPHq4TBrcN6GkzvgpYfataDp8jrd04SomRSJJt1tEtJT5mcO/F5OVSXRt1Yr2/TLp+5CN79fEXXZOKOHWOSX0QhD0SLFVo7ESfq8/Up5Y0GRIyXQMKKb7YhiwkVnDk3niWvAu8c7aLGqAPDWT1m3aDvt+atyci/PUvQKBgCF4uNA3NQOYwf8xuWkgXqW6TpAwHQDf+mj2c992NDxy8s+Y9VBZeqJDFWIY96DXpCPibT+QODD1ZZz3E6ht/7LSIDqimBc/0x0+49dymwWRFl7BOjUpnoLiCYo2RQ78ANIU6tyo9DsNh09jweLKEvAbDUsmlobr87VHFY/tnYgNAoGACu6f5qRRpdctI4+BuWkIVItVjvqgxrBz5Ok3ad9cMtb83wqH9WjNpja20wW3Ujw1tSfwOAmbd56/wfRIo4oENof7NCBhSjWBcIvle1jo/ts6rG2u4QvOwmk8gCloxaTQ4sZYji2fiallYk7zUrTA00kWDcM2Hs2OElfhOxvnffkCgYEAvpIt3Qn7FxW4pdJ50P+RBLcnT4/pUgSnjhI5TXN6aC1PFACWBjiXBEpvl/bKV0QSKcERveSjqTN5Q+Dpv19lu5ROLio2T07mnbmCMgmqs5CcG9qvJvDtte+rkUKwJrrKvUzXN/VcD1mep4BUr+gkyJhOBpSsSo14szAPLQXuvY4=";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluaQO63vjdiu7Smf+neViFkBwxK9+wv+tx/m7JbQqqXeKCtE3zriRX76Wv9VIXG71qATl/LCkPzNSaDwM+9jOS5UwfiM/Da/i5jvnPmJ5Y51jzUikI01NIxeDIPcpFwjxGhyVTU3Mg91JJRu/A1gLbItKEbF1X81N/v+FZW+islDiDTHt9oJdyZVZHus68QeeWEmR1hX43aUnSICylvmIbYZQDp25emCrJvYxLREvJYYtORHqNx+YBMZ+xcNcINe0mBlSlaoRBrANUotbFPGHkRuaR4pzc76aNiMa77e24NP7eZnizsqPQ7JX/G4iEHRs/lm8EMJ7Lhj3W6H+jB7tQIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://4y565831z3.qicp.vip/notifyUrl";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://4y565831z3.qicp.vip/returnUrl";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝日志
    public static String log_path = "C:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
